namespace CloudStorage.API.Entities
{
  /// <summary>
  /// Data Context for manipulating a Cloud Storage Entities
  /// </summary>
  public interface IEntityDataContext
  {
    /// <summary>
    /// Saves an entity to a Table
    /// </summary>
    /// <param name="entitySetName">The name of the entity set</param>
    /// <param name="entity">The entity to insert</param>
    void InsertEntity(string entitySetName, object entity);

    /// <summary>
    /// Updates an entity
    /// </summary>
    /// <param name="entitySetName">The name of the entity set</param>
    /// <param name="entity">The entity to update</param>
    void UpdateEntity(string entitySetName, object entity);

    /// <summary>
    /// Merges an entity
    /// </summary>
    /// <param name="entitySetName">The name of the entity set</param>
    /// <param name="entity">The entity to update</param>
    void MergeEntity(string entitySetName, object entity);

    /// <summary>
    /// Deletes an entity
    /// </summary>
    /// <param name="entitySetName">The entity set</param>
    /// <param name="entityId">The Id for the entity to remove</param>
    void DeleteEntity(string entitySetName, string entityId);
  }
}